<template>
  <div class="epidemic-protect">
    <img
      src="../../assets/404_images/返回顶部.png"
      alt="无"
      class="back_top"
      @click="backTop"
      v-show="isShow"
    />
    <div class="head-img">
      <img
        src="http://img03.sogoucdn.com/app/a/200797/cbda1b95-3d6d-4d9f-859c-47d2bc88e829"
        alt=""
      />
    </div>
    <div class="con">
      <span style="margin-right: 100px" @click="toMap()">在线问诊</span
      ><span>在线义诊医院列表</span>
    </div>

    <div class="hospital-list" style="margin: 0; padding: 0">
      <div class="head-tips">
        集合全部在线义诊医院，让您足不出户安心就诊！在下方↓切换省份。
      </div>
      <div class="select-common">
        <span class="input-title"> 当前省份： </span>
        <el-select
          class="default-select"
          v-model="value"
          placeholder="当前省份为广西省请选择："
          @change="select_1"
        >
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
        <span class="arr"> 切换 </span>
      </div>
      <div class="hospital-box">
        <ul>
          <li v-for="item in value1" :key="item.value_1">
            <div v-if="item">
              <li v-for="(it, index) in item.value" :key="index">
                <h4>{{ it.value_1 }}</h4>
                <p>
                  <span>
                    <i class="xcx1"> </i>
                    <a
                      href="https://wxb584042fd40a695e.wu.guahao.com/ihospital?from=sogou"
                      target="_blank"
                      >访问链接：</a
                    >
                  </span>
                  <strong>{{ it.label_1 }}</strong>
                </p>
              </li>
            </div>
          </li>
        </ul>
      </div>
    </div>
    <div class="doctors-tips">
      <h4 class="tips-title">
        <span> 说明 </span>
      </h4>
      <ul>
        <li>1.列表中互联网医院均通过省级监管。</li>
        <li>
          2.列表中互联网医院为医院自建互联网医院，不包括企业合作共建互联网医院。
        </li>
      </ul>
    </div>
    <div class="word-list-layout">
      <ul class="word-list-common">
        <li>
          <a
            href="http://sa.sogou.com/new-weball/page/sgs/epidemic?type_page=wenzhenpage"
          >
            疫情地图
            <i class="tag-new"> 热 </i>
          </a>
        </li>
        <li>
          <a
            href="https://sa.sogou.com/new-weball/page/sgs/epi_protection?pid=sogou-waps-043c2ec6c6390dd0&s_from=ff09"
            >科学防护专题</a
          >
        </li>
        <li>
          <a href="https://vp.fact.qq.com/home?state=1&source=sogou"
            >实时辟谣</a
          >
        </li>
        <li>
          <a
            href="https://m.sogou.com/web/searchList.jsp?keyword=%E5%85%A8%E5%9B%BD%E5%8F%91%E7%83%AD%E9%97%A8%E8%AF%8A&pid=sogou-waps-4fe5149039b52765&s_from=ff06"
            >全国发热门诊一览</a
          >
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import Logo from "../../layout/components/Sidebar/Logo.vue";
export default {
  mounted() {
    this.listenerFunction();
  },
  created: function () {
    this.value1 = this.obj.filter((item) => {
      return "广西省" == item.name;
    });
  },
  components: { Logo },
  methods: {
    listenerFunction(e) {
      document.addEventListener("scroll", this.handleScroll, true);
    },
    beforeDestroy() {
      document.removeEventListener("scroll", this.listenerFunction);
    },
    handleScroll() {
      // handleScroll 和 methods 是同级
      if (window.pageYOffset > 400) {
        //window.pageYOffset:获取滚动距离
        this.isShow = true;
      } else {
        this.isShow = false;
      }
    },
    backTop() {
      let top = document.documentElement.scrollTop || document.body.scrollTop;
      // 实现滚动效果
      const timeTop = setInterval(() => {
        document.body.scrollTop = document.documentElement.scrollTop = top -= 50;
        if (top <= 0) {
          clearInterval(timeTop);
        }
      }, 10);
    },
    select_1(val) {
      this.value1 = this.obj.filter((item) => {
        return val == item.name;
      });
      // for(item in this.obj){
      //     if(item.name == val){
      //         this.value1 = item.value;
      //         console.log(item.value);
      //     }
      // }
    },
    toMap(val) {
      this.$router.push({
        path: "/omc_list/consultation",
      });
    },
    select_2() {
      this.value1 = this.obj.filter((item) => {
        return "广西省" == item.name;
      });
    },
  },
  data() {
    return {
      isShow: false,
      obj: [
        {
          name: "广东省",
          value: [
            { value_1: "广东江门市中心医院", label_1: "微医平台" },
            { value_1: "广东南方医科大学顺德医院", label_1: "微脉平台" },
            { value_1: "广东江门市中心医院", label_1: "微医平台" },
            { value_1: "广东南方医科大学顺德医院", label_1: "微脉平台" },
            { value_1: "广东江门市中心医院", label_1: "微医平台" },
            { value_1: "广东南方医科大学顺德医院", label_1: "微脉平台" },
            { value_1: "广东江门市中心医院", label_1: "微医平台" },
            { value_1: "广东南方医科大学顺德医院", label_1: "微脉平台" },
            { value_1: "广东江门市中心医院", label_1: "微医平台" },
            { value_1: "广东南方医科大学顺德医院", label_1: "微脉平台" },
            { value_1: "广东江门市中心医院", label_1: "微医平台" },
            { value_1: "广东南方医科大学顺德医院", label_1: "微脉平台" },
          ],
        },
        {
          name: "山东省",
          value: [
            { value_1: "山东中医药大学附属医院", label_1: "微医平台" },
            { value_1: "山东省立医院", label_1: "微脉平台" },
            { value_1: "山东中医药大学附属医院", label_1: "微医平台" },
            { value_1: "山东省立医院", label_1: "微脉平台" },
            { value_1: "山东中医药大学附属医院", label_1: "微医平台" },
            { value_1: "山东省立医院", label_1: "微脉平台" },
            { value_1: "山东中医药大学附属医院", label_1: "微医平台" },
            { value_1: "山东省立医院", label_1: "微脉平台" },
            { value_1: "山东中医药大学附属医院", label_1: "微医平台" },
            { value_1: "山东省立医院", label_1: "微脉平台" },
            { value_1: "山东中医药大学附属医院", label_1: "微医平台" },
            { value_1: "山东省立医院", label_1: "微脉平台" },
          ],
        },
        {
          name: "四川省",
          value: [
            { value_1: "四川省人民医院", label_1: "四川大学人民医院" },
            { value_1: "四川大学华西医院", label_1: "四川大学华西医院" },
            { value_1: "四川省人民医院", label_1: "四川大学人民医院" },
            { value_1: "四川大学华西医院", label_1: "四川大学华西医院" },
            { value_1: "四川省人民医院", label_1: "四川大学人民医院" },
            { value_1: "四川大学华西医院", label_1: "四川大学华西医院" },
            { value_1: "四川省人民医院", label_1: "四川大学人民医院" },
            { value_1: "四川大学华西医院", label_1: "四川大学华西医院" },
            { value_1: "四川省人民医院", label_1: "四川大学人民医院" },
            { value_1: "四川大学华西医院", label_1: "四川大学华西医院" },
            { value_1: "四川省人民医院", label_1: "四川大学人民医院" },
            { value_1: "四川大学华西医院", label_1: "四川大学华西医院" },
          ],
        },
        {
          name: "浙江省",
          value: [
            { value_1: "浙江大学医学院附属第一医院", label_1: "掌上浙一" },
            { value_1: "浙江大学医学院附属第二医院", label_1: "浙江好E生" },
            { value_1: "浙江大学医学院附属第一医院", label_1: "掌上浙一" },
            { value_1: "浙江大学医学院附属第二医院", label_1: "浙江好E生" },
            { value_1: "浙江大学医学院附属第一医院", label_1: "掌上浙一" },
            { value_1: "浙江大学医学院附属第二医院", label_1: "浙江好E生" },
            { value_1: "浙江大学医学院附属第一医院", label_1: "掌上浙一" },
            { value_1: "浙江大学医学院附属第二医院", label_1: "浙江好E生" },
            { value_1: "浙江大学医学院附属第一医院", label_1: "掌上浙一" },
            { value_1: "浙江大学医学院附属第二医院", label_1: "浙江好E生" },
            { value_1: "浙江大学医学院附属第一医院", label_1: "掌上浙一" },
            { value_1: "浙江大学医学院附属第二医院", label_1: "浙江好E生" },
          ],
        },
        {
          name: "广西省",
          value: [
            { value_1: "广西科技大学人民医院", label_1: "广科大" },
            { value_1: "广西科技大学第二人民医院", label_1: "广科大" },
            { value_1: "广西科技大学人民医院", label_1: "掌上浙一" },
            { value_1: "广西科技大学第二人民医院", label_1: "广科大" },
            { value_1: "广西科技大学人民医院", label_1: "掌上浙一" },
            { value_1: "广西科技大学第二人民医院", label_1: "广科大" },
            { value_1: "广西科技大学人民医院", label_1: "广科大" },
            { value_1: "广西科技大学第二人民医院", label_1: "广科大" },
            { value_1: "广西科技大学人民医院", label_1: "掌上浙一" },
            { value_1: "广西科技大学第二人民医院", label_1: "广科大" },
            { value_1: "广西科技大学人民医院", label_1: "掌上浙一" },
            { value_1: "广西科技大学第二人民医院", label_1: "广科大" },
            { value_1: "广西科技大学人民医院", label_1: "广科大" },
            { value_1: "广西科技大学第二人民医院", label_1: "广科大" },
            { value_1: "广西科技大学人民医院", label_1: "掌上浙一" },
            { value_1: "广西科技大学第二人民医院", label_1: "广科大" },
            { value_1: "广西科技大学人民医院", label_1: "掌上浙一" },
            { value_1: "广西科技大学第二人民医院", label_1: "广科大" },
            { value_1: "广西科技大学人民医院", label_1: "广科大" },
            { value_1: "广西科技大学第二人民医院", label_1: "广科大" },
            { value_1: "广西科技大学人民医院", label_1: "掌上浙一" },
            { value_1: "广西科技大学第二人民医院", label_1: "广科大" },
            { value_1: "广西科技大学人民医院", label_1: "掌上浙一" },
            { value_1: "广西科技大学第二人民医院", label_1: "广科大" },

          ],
        },
      ],
      options: [
        { value: "广东省", label: "广东省" },
        { value: "山东省", label: "山东省" },
        { value: "四川省", label: "四川省" },
        { value: "浙江省", label: "浙江省" },
        { value: "广西省", label: "广西省" },
      ],
      value: "",
      value1: [],
    };
  },
};
</script>


<style>
.back_top {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 9%;
  right: 2%;
  text-align: center;
  cursor: pointer;
  transition: width 2s;
  transition: height 2s;
  transition-duration: 1s;
  transition-property: all;
}
.back_top:hover {
  height: 100px;
  width: 100px;
}
div {
  margin: 0;
  padding: 0;
}
body {
  font-size: 14px;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-text-size-adjust: none;
  font-size-adjust: none;
  color: #555;
  word-break: break-all;
  word-wrap: break-word;
}
.epidemic-protect {
  width: 900px;
  margin: 0 auto;
  padding: 0;
  background-color: #fff;
  font-size: 14px;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-text-size-adjust: none;
  font-size-adjust: none;
  color: #555;
  word-break: break-all;
  word-wrap: break-word;
}
.epidemic-protect .head-img {
  position: relative;
  padding: 0;
}
.epidemic-protect .head-img img {
  display: block;
  width: 100%;
  border: 0;
  margin: 0;
  padding: 0;
}
.epidemic-protect .con {
  height: 58px;
  width: 100%;
  color: #2480ff;
  font-size: 15px;
  text-align: center;
  line-height: 58px;
  margin: 0;
  padding: 0;
}
.epidemic-protect .head-tips {
  text-align: center;
  line-height: 18px;
  font-size: 14px;
  background: #fef5e5
    url(//hhydoc.sogoucdn.com/deploy/js/hospital/consultationGuide/tips_353645a.png)
    16px 12px no-repeat;
  background-size: auto;
  background-size: 16px auto;
  padding: 11px 11px 11px 37px;
  color: #5f372e;
  margin: 0 -16px 10px;
}
.select-common {
  position: relative;
  z-index: 2;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-border-radius: 3px;
  border-radius: 6px;
  background: #f5f5f5;
  margin-top: 14px;
}
.select-common .input-title {
  color: #999;
  line-height: 40px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  padding-left: 13px;
  font-size: 13px;
}
.select-common .default-select {
  font-size: 13px;
  padding-right: 62px;
  position: relative;
  z-index: 5;
  width: 90%;
  left: 3px;
  top: 3px;
  height: 35px;
  line-height: 35px;
  border: none;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  vertical-align: middle;
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
  overflow: hidden;
  outline: none;
  font-weight: normal;
}
.select-common .arr {
  position: absolute;
  top: 0;
  right: 0;
  line-height: 40px;
  padding-right: 15px;
  font-size: 13px;
  color: #333;
}
.select-common .arr::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 5px;
  background: url(//hhydoc.sogoucdn.com/deploy/js/hospital/consultationGuide/ico_arr_90dff9b.png)
    center center no-repeat;
  background-size: auto;
  background-size: 8px auto;
  margin-left: 6px;
  vertical-align: 1px;
  line-height: 40px;
  font-size: 13px;
  color: #333;
}
.hospital-box {
  user-select: auto;
}
ul,
li,
ol {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.hospital-box li {
  padding: 12px 0;
  border-bottom: 1px solid #e2e2e2;
}
.hospital-box h4 {
  font-size: 16px;
  line-height: 24px;
  color: #151c2b;
  font-weight: normal;
  margin: 0;
  padding: 0;
}
.hospital-box p {
  font-size: 12px;
  line-height: 20px;
  color: #666;
  margin: 0;
  padding: 0;
}
.hospital-box span {
  color: #999;
  font-size: 12px;
  line-height: 20px;
}
.hospital-box span .xcx1 {
  width: 12px;
  height: 12px;
  background: url(//hhydoc.sogoucdn.com/deploy/js/hospital/consultationGuide/xcx1_b8a484f.png)
    center center no-repeat;
  background-size: auto;
  background-size: 12px auto;
  margin-right: 10px;
  display: inline-block;
  vertical-align: -2px;
  font-style: normal;
}
.epidemic-protect .doctors-tips {
  border-radius: 4px;
  padding: 15px;
  border: 1px solid paleturquoise;
  background-color: #f3f8ff;
  font-size: 12px;
  color: #333333;
  line-height: 18px;
  padding: 14px 12px;
  margin-bottom: 20px;
  margin: 0;
}
.epidemic-protect .doctors-tips h4 {
  padding: 3px 0;
}
.epidemic-protect .tips-title {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: normal;
  margin: 0;
  line-height: 18px;
  color: #333333;
}
.epidemic-protect .tips-title::before,
.epidemic-protect .tips-title::after {
  content: "";
  display: block;
  width: 13px;
  height: 1px;
  background-color: rgba(51, 51, 51, 0.16);
  box-shadow: 0 3px 0 0 #ccc;
  margin-bottom: 4px;
  text-align: center;
  font-size: 12px;
  font-weight: normal;
  color: #333333;
  line-height: 18px;
}
.epidemic-protect .tips-title span {
  display: inline-block;
  padding: 0 10px;
  text-align: center;
  font-size: 12px;
  color: #333333;
  line-height: 18px;
}
ul,
li,
ol {
  list-style-type: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  color: #333333;
  line-height: 18px;
}
.epidemic-protect .doctors-tips li {
  padding: 3px 0;
  margin: 0;
  font-size: 12px;
  color: #333333;
  line-height: 18px;
}
.epidemic-protect .word-list-layout {
  margin-top: 20px;
  margin-left: -8px;
  margin-right: -8px;
  overflow: hidden;
  display: flex;
}
.epidemic-protect .word-list-common {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  margin-bottom: -8px;
  padding-right: 8px;
}
.epidemic-protect .word-list-common li {
  flex-grow: 0;
  flex-shrink: 0;
  vertical-align: top;
  height: 43px;
  width: 50%;
}
.epidemic-protect .word-list-common a {
  display: block;
  height: 35px;
  box-sizing: border-box;
  line-height: 35px;
  border-radius: 2px;
  text-align: center;
  background: #f5f5f5;
  -webkit-appearance: none;
  padding: 0 10px;
  margin: 0 0 8px 8px;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
  color: #555;
  text-decoration: none;
}
.epidemic-protect .tag-new {
  display: inline-block;
  width: 15px;
  height: 15px;
  line-height: 15px;
  border: 1px solid #de271c;
  box-sizing: border-box;
  border-radius: 1px;
  color: #de271c;
  font-size: 11px;
  margin-left: 5px;
  position: relative;
  font-style: normal;
  text-align: center;
  top: -1px;
}
</style>
